
import React from 'react'

// import '../../index.scss'

export default class Partner extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            partnerNavList:[
                {url:'/static/indexImg/di_1@2x.png',id:1},
                {url:'/static/indexImg/di_2@2x.png',id:2},
                {url:'/static/indexImg/di_3@2x.png',id:3},
                {url:'/static/indexImg/di_4@2x.png',id:4},
            ]
        }
    }
    static getDerivedStateFromProps(nextProps){
        let friendDataList = nextProps.friendData
        return {
            friendDataList
        }
    }
    render(){
        return (
            <div className='partner'>
                <div className='partner_top'>
                    <span>合作伙伴</span>
                </div>
                <div className='partner_con'>
                    {
                        this.state.friendDataList &&
                        this.state.friendDataList.map(item => {
                            return (
                                <img key={item.id} className='partner_con_img' src={item.img} />
                            )
                        })
                    }

                </div>
                <ul className='partner_foo'>
                    {
                        this.state.partnerNavList.map(item => {
                            return (
                                <li className='partner_foo_item' key={item.id}>
                                    <img src={item.url} alt=""/>
                                </li>
                            )
                        })
                    }
                </ul>
            </div>
        )
    }
}